﻿<%@ Page Language="C#" AutoEventWireup="true" Theme="Default" CodeBehind="TuoShouTPCX.aspx.cs" Inherits="Web.Pages.YongShui._6.ZhangWuGL.TuoShouTPCX" %>
<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>已托收退票查询</title>
    <script type="text/javascript">
        function Select() {
            if (event.keyCode == 13) {
                var ny = txtZhangWuNY.GetText();
                if (ny == "") {
                    alert("请输入账务年月后查询");
                    return;
                }

                if (ny.length != 6) {
                    alert("账务年月格式错误");
                    return;
                }
                var m = Number(ny.substring(4));

                if (isNaN(m) || m > 12 || m < 1) {
                    alert("账务年月格式错误");
                    return;
                }

                BtnSelect.onClick();
            }
        }

    </script>
</head>
<body>
    <form id="form1" runat="server">
        <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
        <div style="width:96%; margin:0px auto">
            <div class="tabletitle1" align="center">
                查询
            </div>


            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <div style="display: none">
                        <dx:ASPxButton ID="BtnSelect" ClientInstanceName="BtnSelect" runat="server" Text="" OnClick="BtnSelect_Click" UseSubmitBehavior="false">
                            <ClientSideEvents Click="function(){LoadPanel.Show();}" />
                        </dx:ASPxButton>
                    </div>
                    <dx:ASPxLoadingPanel ID="LoadPanel" Theme="Metropolis" ClientInstanceName="LoadPanel" runat="server" Modal="True" Text="正在查询..."></dx:ASPxLoadingPanel>
                    <div class="">
                        <table>
                            <tr>
                                <td>
                                    <asp:Label ID="lblZhangWuNY" runat="server" Style="font-size: 12px;" Text="账务年月"></asp:Label>
                                </td>
                                <td>
                                    <dx:ASPxTextBox ID="txtZhangWuNY" ClientInstanceName="txtZhangWuNY" runat="server" Width="170px">
                                        <ClientSideEvents KeyDown="function(s,e){Select();}" />
                                    </dx:ASPxTextBox>

                                </td>
                            </tr>
                        </table>
                    </div>
                    <div></div>
                    <dx:ASPxPageControl ID="ASPxPageControl1" runat="server" ActiveTabIndex="1" Width="100%" Height="530px">
                        <TabPages>
                            <dx:TabPage Text="按管理快汇总">
                                <ContentCollection>
                                    <dx:ContentControl>

                                        <div>

                                            <dx:ASPxGridView ID="gvGUANLIK" runat="server" AutoGenerateColumns="False" KeyFieldName="GLK" Theme="Aqua1" Width="100%">
                                                <Columns>
                                                    <dx:GridViewDataTextColumn FieldName="GLK" Caption="管理快" Width="33%">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="ZBS" Caption="总笔数" Width="33%">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="ZJE" Caption="总金额" Width="34%">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N2}"></PropertiesTextEdit>
                                                    </dx:GridViewDataTextColumn>

                                                </Columns>
                                               <SettingsPager  Mode="ShowAllRecords"></SettingsPager>
                                                <Settings VerticalScrollableHeight="450" VerticalScrollBarMode="Auto" HorizontalScrollBarMode="Auto" />
                                            </dx:ASPxGridView>


                                        </div>

                                        <div>
                                            <table style="width: 100%; text-align: center;height: 40px;">

                                                <tr>
                                                    <td class="auto-style4" align="right"><span style="font-size: 12px;">总笔数：</span></td>
                                                    <td>
                                                        <dx:ASPxTextBox ID="txtZongBiS" Width="80%" runat="server" Enabled="false">
                                                        </dx:ASPxTextBox>
                                                    </td>

                                                    <td class="auto-style4" align="right"><span style="font-size: 12px;">总金额：</span></td>
                                                    <td>
                                                        <dx:ASPxTextBox ID="txtZongJieE" Width="80%" runat="server" Enabled="false">
                                                        </dx:ASPxTextBox>
                                                    </td>
                                                </tr>

                                            </table>
                                        </div>

                                    </dx:ContentControl>
                                </ContentCollection>
                            </dx:TabPage>
                            <dx:TabPage Text="手工明细">
                                <ContentCollection>
                                    <dx:ContentControl>
                                        <div>
                                            <dx:ASPxGridView ID="gvMINGXI" runat="server" AutoGenerateColumns="False" KeyFieldName="I_ZHICHUBH" Theme="Aqua1" Width="100%">
                                                <Columns>
                                                    <dx:GridViewDataTextColumn FieldName="I_YUANBH" Caption="托收凭证号" Width="15%">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="GLK" Caption="管理块" Width="10%">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="S_YONGHUH" Caption="用户编号" Width="10%">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="S_YONGHUM" Caption="用户名" Width="45%">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="YM" Caption="水量年月" Width="10%">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn FieldName="N_JINE" Caption="金额" Width="10%">
                                                        <PropertiesTextEdit DisplayFormatString="{0:N2}"></PropertiesTextEdit>
                                                    </dx:GridViewDataTextColumn>

                                                </Columns>
                                               
                                                <Settings VerticalScrollableHeight="400" VerticalScrollBarMode="Auto" HorizontalScrollBarMode="Auto" />
                                            </dx:ASPxGridView>
                                        </div>
                                        <div>
                                            <table style="width: 100%; text-align: center; height: 40px;">

                                                <tr>
                                                    <td class="auto-style4" align="right"><span style="font-size: 12px;">总笔数：</span></td>
                                                    <td>
                                                        <dx:ASPxTextBox ID="txtZBS" Width="80%" runat="server" Enabled="false">
                                                        </dx:ASPxTextBox>
                                                    </td>

                                                    <td class="auto-style4" align="right"><span style="font-size: 12px;">总金额：</span></td>
                                                    <td>
                                                        <dx:ASPxTextBox ID="txtZJE" Width="80%" runat="server" Enabled="false">
                                                        </dx:ASPxTextBox>
                                                    </td>
                                                </tr>

                                            </table>
                                        </div>
                                    </dx:ContentControl>
                                </ContentCollection>
                            </dx:TabPage>
                        </TabPages>
                    </dx:ASPxPageControl>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </form>
</body>
</html>
